Skip to main content

Bug Tracker

Side navigation

Ticket #3107: global-trigger[5756].diff
File global-trigger[5756].diff, 0.6 KB (added by flesler, July 01, 2008 02:23AM UTC)
Index: jquery/src/event.js
===================================================================
--- jquery/src/event.js	(revision 5754)
+++ jquery/src/event.js	(working copy)
@@ -168,7 +168,10 @@
 		if ( !elem ) {
 			// Only trigger if we've ever bound an event for it
 			if ( this.global[type] )
-				jQuery("*").add([window, document]).trigger(type, data);
+				jQuery.each( jQuery.cache, function(){
+					if ( this.events && this.events[type] )
+						jQuery.event.trigger( type, data, this.handle.elem );
+				});
 
 		// Handle triggering a single element
 		} else {

Download in other formats:

Original Format